package com.mz.mattress.admin.api.admin;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mz.mattress.admin.api.req.PlanDateQueryReq;
import com.mz.mattress.admin.mapper.PlanSendTaskRecordMapper;
import com.mz.mattress.api.common.Constants;
import com.mz.mattress.api.common.Result;
import com.mz.mattress.api.entity.PlanSendTaskRecord;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping(Constants.ADMIN_PATH + "planHandSendTaskRecord")
public class PlanSendTaskRecordController {

    @Autowired
    private PlanSendTaskRecordMapper planSendTaskRecordMapper;

    @GetMapping("/listPage")
    public Result<IPage<PlanSendTaskRecord>> listPage(PlanDateQueryReq req) {
        Page<PlanSendTaskRecord> listPage = planSendTaskRecordMapper.listPage(req.newPage());
        return Result.ok(listPage);
    }

}
